<template>
    <svg
      class="icon svg-icon"
      aria-hidden="true"
      :style="{ width: width, height: height }"
    >
      <use :xlink:href="getIcon"></use>
    </svg>
</template>

<script>
import {} from "./font-lanjian/iconfont.js"; //注意路径
import "./font-lanjian/iconfont.css";
export default {
  name: "IconLanjian",
  props: {
    type: {
      type: String,
      default: "",
      required: true,
    },
    width: {
      type: String,
      default: "20px",
    },
    height: {
      type: String,
      default: "20px",
    },
  },
  computed: {
    getIcon() {
      let icon = `#icon-${this.type}`;
      return icon;
    },
  },
  watch: {},
  data() {
    return {};
  },
  methods: {},
};
</script>
